package com.dao;

import com.pojo.Emp;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface EmpDAO extends JpaRepository<Emp,Integer>{

     @Query("from Emp e join fetch e.dep d where d.depId=?1")
     List getAllEmpWithDepByDep(int depId);
}
